const mongo = require('../db/db.js')
module.exports = {
    login:function (req,res) {
        let name = req.query.name;
        let pass = req.query.pass;
        mongo.find('user',{'name':name,"pass":pass},{},function (result) {
            if(result.length>0){
                res.json({
                    status:200,
                    msg:'登录成功'
                })
            }else{
                res.json({
                    status:500,
                    msg:'登录失败没有当前账号',
                })
            }
        })
    },
    addType:function (req,res) {

    }
}
